<template>
  <div class="modal">
    <a-modal :footer="null" :title="title" v-model="ifshow" :width="width" @cancel="cancel">
      <slot />
    </a-modal>
  </div>
</template>

<script>
export default {
  props:{
    show:{
      type:Boolean,
    },
    title:{
      type:String
    },
    width:{
      type:[String,Number],
      default:()=>{
        return 520
      }
    }
  },
  data() {
    return {
      ifshow:false
    }
  },
  watch: {
    show:function(e){
      this.ifshow = e
    }
  },
  methods: {
    cancel:function(){
      this.$emit('close')
    }
  },
}
</script>

<style scoped>
  
</style>